home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-14 | 85.1 KB | 3,375 lines |
- TABLE OF CONTENTS
-
- dfunc.library/DFAllocBitmap
- dfunc.library/DFAllocVMem
- dfunc.library/DFBeavel
- dfunc.library/DFBitmap
- dfunc.library/DFBox
- dfunc.library/DFCalcArg
- dfunc.library/DFCloseXWindow
- dfunc.library/DFClrCache
- dfunc.library/DFClrPattern
- dfunc.library/DFClrPort
- dfunc.library/DFClrRast
- dfunc.library/DFCompareStr
- dfunc.library/DFCopyString
- dfunc.library/DFCountGads
- dfunc.library/DFDeleteFile
- dfunc.library/DFDeltaList
- dfunc.library/DFDisable
- dfunc.library/DFDosBase
- dfunc.library/DFDrawI
- dfunc.library/DFEnable
- dfunc.library/DFFillWindow
- dfunc.library/DFFindID
- dfunc.library/DFFindScreen
- dfunc.library/DFFindStrLen
- dfunc.library/DFFindTask
- dfunc.library/DFFindWindow
- dfunc.library/DFFreeBitmap
- dfunc.library/DFFreeVMem
- dfunc.library/DFGetColors
- dfunc.library/DFGetFileLength
- dfunc.library/DFGetFlags
- dfunc.library/DFGetGFont
- dfunc.library/DFGetID
- dfunc.library/DFGetImage
- dfunc.library/DFGetMath
- dfunc.library/DFGetProc
- dfunc.library/DFGetTitle
- dfunc.library/DFGetToggle
- dfunc.library/DFGetVMemSize
- dfunc.library/DFGhostGads
- dfunc.library/DFGraphicsBase
- dfunc.library/DFInitScale
- dfunc.library/DFIntuitionBase
- dfunc.library/DFLine
- dfunc.library/DFLoadFile
- dfunc.library/DFLoadRGB4
- dfunc.library/DFLowerCase
- dfunc.library/DFMakeAscii
- dfunc.library/DFMakeBool
- dfunc.library/DFMakeRastport
- dfunc.library/DFNewPrintText
- dfunc.library/DFNewProcess
- dfunc.library/DFOpenXWindow
- dfunc.library/DFPrinterCommand
- dfunc.library/DFPrinterText
- dfunc.library/DFPrinterWindow
- dfunc.library/DFPrintF
- dfunc.library/DFPrintText
- dfunc.library/DFPrintTxt2
- dfunc.library/DFReadArg
- dfunc.library/DFRefreshXFrame
- dfunc.library/DFRemFile
- dfunc.library/DFRemRastport
- dfunc.library/DFRemScale
- dfunc.library/DFRenameTask
- dfunc.library/DFRenderGadgets
- dfunc.library/DFReverseBuffer
- dfunc.library/DFSaveBuffer
- dfunc.library/DFSaveIFF
- dfunc.library/DFScaleGads
- dfunc.library/DFScreenOfWindow
- dfunc.library/DFScreenRastport
- dfunc.library/DFSearch
- dfunc.library/DFSetBPen
- dfunc.library/DFSetColors
- dfunc.library/DFSetDrMd
- dfunc.library/DFSetFlags
- dfunc.library/DFSetFont
- dfunc.library/DFSetGFont
- dfunc.library/DFSetID
- dfunc.library/DFSetImage
- dfunc.library/DFSetPattern
- dfunc.library/DFSetPen
- dfunc.library/DFSetTitle
- dfunc.library/DFStripBool
- dfunc.library/DFStripText
- dfunc.library/DFToggle
- dfunc.library/DFUpdateGad
- dfunc.library/DFUpperCase
- dfunc.library/DFUserPort
- dfunc.library/DFViewport
- dfunc.library/DFWaitGad
- dfunc.library/DFWaitMsg
- dfunc.library/DFWindowRastport
- dfunc.library/DFWriteStd
-
-
- dfunc.library/DFAllocBitmap dfunc.library/DFAllocBitmap
-
- NAME
- DFAllocBitmap -- Allocate a bitmap structure with bitplanes.
-
- SYNOPSIS
-
- bitmap=DFAllocBitmap(width,height,depth)
- d0 d1 d2:16
-
- struct bitmap *DFAllocBitmap(WORD, WORD, WORD);
-
-
- FUNCTION
- This function will try to allocate a bitmap structure. It will also
- initialize the structure with bitplanes and pointers if there is enough
- memory. You will get returned a pointer to this bitmap structure or NULL
- if any failure (low memory).
-
- INPUTS
- width - width of bitplanes
- height - height of bitplanes
- depth - number of bitplanes (2^depth = number of colors)
-
- RESULTS
- bitmap - pointer to an initialized bitmap structure.
-
- SEE ALSO
- DFFreeBitmap()
-
-
- dfunc.library/DFAllocVMem dfunc.library/DFAllocVMem
-
- NAME
- DFAllocVMem -- Allocates a memory buffer with internal structure.
-
- SYNOPSIS
-
- buffer=DFAllocVMem(size,type)
- d0 d1
-
- APTR DFAllocVMem(ULONG, ULONG);
-
-
- FUNCTION
- This function will allocate a memory buffer like the
- exec.library/AllocMem() function, but with this function you don't have to
- remember the size of the buffer when freeing the buffer.
-
- INPUTS
- size - size of buffer in bytes
- type - requirements (see exec.library/AllocMem() for more information)
-
- RESULTS
- buffer - pointer to an allocated buffer or NULL if any error.
-
- SEE ALSO
- DFFreeVMem(), DFGetVMemSize(), exec.library/AllocMem()
-
-
- dfunc.library/DFBeavel dfunc.library/DFBeavel
-
- NAME
- DFBeavel -- Draws a beaveled box into rastport.
-
- SYNOPSIS
-
- DFBeavel(Rastport,left,top,width,height,cols)
- a0 d0 d1 d2 d3:16 d4:8
-
- void DFBeavel(struct rastport *, WORD, WORD, WORD, WORD, UBYTE);
-
-
- FUNCTION
- This function will draw a beaveled box into the rastport. Note that the
- width and height values are deltas to the left and top values and not end
- positions. The color field will select the hi-light color and the shadow
- color of the box. The values for each color is 4 bit which you can pick
- from a palette of 16 colors. The first (lower) 4 bits (0-3) is shadow and
- the bits from 4-7 is the hi-light color.
-
- INPUTS
- Rastport - pointer to a valid rastport
- left - x start position
- top - y start position
- width - delta to y position (x+width)
- height - delta to y position
- cols - 2x4 bits color value to describe hi-light and shadow colors.
-
- SEE ALSO
-
-
- dfunc.library/DFBitmap dfunc.library/DFBitmap
-
- NAME
- DFBitmap -- Returns a pointer to the bitmap structure of screen.
-
- SYNOPSIS
-
- bitmap=DFBitmap(screen)
- a0
-
- struct bitmap *DFBitmap(struct screen *);
-
-
- FUNCTION
- This function will return a pointer to the bitmap structure of the screen.
-
- INPUTS
- screen - pointer to a screen
-
- RESULTS
- bitmap - pointer to bitmap of screen
-
- SEE ALSO
- DFViewport()
-
-
- dfunc.library/DFBox dfunc.library/DFBox
-
- NAME
- DFBox -- Draws a filled box in rastport.
-
- SYNOPSIS
-
- DFBox(Rastport,x1,y1,x2,y2)
- a0 d0 d1 d2 d3:16
-
- void DFBox(struct rastport *, word, word, word, word);
-
-
- FUNCTION
- This function will draw a filled rectangle or box into a valid rastport.
-
- INPUTS
- Rastport - pointer to a valid rastport
- x1 - x start position
- y1 - y start position
- x2 - x end position
- y2 - y end position
-
- SEE ALSO
-
-
- dfunc.library/DFCalcArg dfunc.library/DFCalcArg
-
- NAME
- DFCalcArg -- Converts a string to a value.
-
- SYNOPSIS
-
- value=DFCalcArg(string)
- a0
-
- WORD *DFCalcArg(STRPTR);
-
-
- FUNCTION
- This function will calculate a string into a value. If there are any
- errors in the string the function will return 0 this is of course also
- when the string is a zero value. The string must be null terminated and
- contain no whitespaces. The number can be both decimal and hexadecimal.
-
- This function is very handy when reading single arguments from a argument
- string returned by eg. a dos/cli command.
-
- INPUTS
- string - pointer to a number string (hex or dec).
-
- RESULTS
- value - value of string
-
- NOTES
- Returns only 16 bit values (currently).
-
- EXAMPLE
- Label1: dc.b "12678",0 will become Label1 = 12678
- Label2: dc.b "$12ff",0 will become Label2 = $12ff
- Label3: dc.b "$0023ac",0 will become Label3 = $23ac
- Label4: dc.b "hello",0 will become Label4 = 0
-
- BUGS
- It should support the 0x.. format and should return 32 bit values.
-
- SEE ALSO
- DFReadArg()
-
-
- dfunc.library/DFCloseXWindow dfunc.library/DFCloseXWindow
-
- NAME
- DFCloseXWindow -- Closes a window opened by DFOpenXWindow() [private].
-
- SYNOPSIS
-
- DFCloseXWindow(xwindow)
- a0
-
- void DFCloseXWindow(struct xwindow *);
-
-
- FUNCTION
- This function will try to close the window opened with DFOpenXWindow().
- It's important to use this function even though you can use the
- intuition.library/CloseWindow() function. The reason for that is that this
- function will free all memory for the userdata field which the
- CloseWindow() function wount. The machine will not crash, but it will
- fragment your memory.
-
- INPUTS
- xwindow - pointer returned by DFOpenXwindow()
-
- SEE ALSO
- DFOpenXwindow()
-
-
- dfunc.library/DFClrCache dfunc.library/DFClrCache
-
- NAME
- DFClrCache -- Dummy function for exec.library/DFClearCacheU() (V37+).
-
- SYNOPSIS
-
- DFClrCache()
-
-
- void DFClrCache();
-
-
- FUNCTION
- This function is a dummy function for exec.library/ClearCacheU(). See
- documentation for that function for more info. Clears the cache.
-
- SEE ALSO
- exec.library/ClearCacheU()
-
-
- dfunc.library/DFClrPattern dfunc.library/DFClrPattern
-
- NAME
- DFClrPattern -- This will clear the pattern set by DFSetPattern().
-
- SYNOPSIS
-
- DFClrPattern(rastport)
- a0
-
- void DFClrPattern(struct rastport *);
-
-
- FUNCTION
- This function will clear the pattern set by DFSetPattern(). I will make a
- mask with all bits set as a normal rastport is initialized.
-
- INPUTS
- rastport - pointer to a rastport
-
- SEE ALSO
- DFSetPattern()
-
-
- dfunc.library/DFClrPort dfunc.library/DFClrPort
-
- NAME
- DFClrPort -- removes a link of messages from a message port.
-
- SYNOPSIS
-
- DFClrPort(port)
- a0
-
- void DFClrPort(struct msgport *);
-
-
- FUNCTION
- This function will remove any link of messages waiting for a GetMsg(). The
- port will be emptied and the messages replied. The user will not get any
- of the messages. This is useful when you wait for a heavy task to finish
- and you can expect the user to have pushed keys and buttons randomly. This
- function will prevent the "button pusher syndrome" kinds of errors.
-
- INPUTS
- port - pointer to valid message port structure
-
- SEE ALSO
- exec.library/WaitPort(), exec.library/GetMsg(), exec.library/ReplyMsg()
-
-
- dfunc.library/DFClrRast dfunc.library/DFClrRast
-
- NAME
- DFClrRast -- Clears the rastport with b pen.
-
- SYNOPSIS
-
- DFClrRast(rastport,yPos,mode)
- a0 d0 d1
-
- void DFClrRast(struct rastport *, WORD, UBYTE);
-
-
- FUNCTION
- This function will clear the drawfield of the rastport from y position
- and to the bottom of the rastport with the background pen (set by
- DFSetBPen()). You have to refresh the window frames after this routine
- has returned.
-
- INPUTS
- rastport - pointer to a (window) rastport
- yPos - y position to start from (origin top)
- mode - 0 = filled, 1=ghosted
-
-
- SEE ALSO
- DFFillWindow(), DFSetBPen()
-
-
- dfunc.library/DFCompareStr dfunc.library/DFCompareStr
-
- NAME
- DFCompareStr -- Compare two strings.
-
- SYNOPSIS
-
- success=DFCompareStr(string1,string2,mode)
- a0 a1 d0
-
- BOOL DFCompareStr(STRPTR, STRPTR, UBYTE);
-
-
- FUNCTION
- This function compares two strings. You can compare them partially (mode
- 1) or full (mode 0). With mode 0 the strings must be exact alike.
-
- INPUTS
- string1 - pointer to a string [0]
- string2 - pointer to a string
- mode - mode 0 = alike
- mode 1 = partially alike
-
- RESULTS
- success - true if alike, else flase
-
-
- dfunc.library/DFCopyString dfunc.library/DFCopyString
-
- NAME
- DFCopyString -- Copy a string to a buffer.
-
- SYNOPSIS
-
- DFCopyString(srcStr,destStr)
- a0 a1
-
- void DFCopyString(STRPTR,APTR);
-
-
- FUNCTION
- This function will copy a nullterminated string to a buffer and null
- terminate the buffer.
-
- INPUTS
- srcStr - pointer to a null terminated string
- destStr - pointer to destination buffer
-
- SEE ALSO
-
-
- dfunc.library/DFCountGads dfunc.library/DFCountGads
-
- NAME
- DFCountGads -- Counts number of gadgets in a gadgetlist.
-
- SYNOPSIS
-
- gadgets=DFCountGads(GadList)
- a0
-
- WORD DFCountGads(struct gadlist *);
-
-
- FUNCTION
- This function will count number of gadgets in a gadgetlist.This is useful
- when using the set functions for gadgets to prevent accidental writing to
- illegal memory areas.
-
- INPUTS
- GadList - pointer to a gadget list
-
- RESULTS
- gadgets - number of gadgets in list
-
- SEE ALSO
-
-
- dfunc.library/DFDeleteFile dfunc.library/DFDeleteFile
-
- NAME
- DFDeleteFile -- Will attempt to delete a file from disk.
-
- SYNOPSIS
-
- success=DFDeleteFile(filename)
- a0
-
- BOOL *DFDeleteFile(STRPTR);
-
-
- FUNCTION
- This function will attempt to delete a file from disk.
-
- INPUTS
- filename - points to a filename string[0]
-
- RESULTS
- success - true if succeed, false if any error
-
- NOTES
- See the dos.library/Delete() function for more information.
-
- SEE ALSO
- dos.library/Delete()
-
-
- dfunc.library/DFDeltaList dfunc.library/DFDeltaList
-
- NAME
- DFDeltaList -- Will add deltas to all gadget positions in a gadgetlist.
-
- SYNOPSIS
-
- DFDeltaList(GadList,x ,y )
- a0 d0 d1
-
- void DFDeltaList(struct gadlist *, WORD, WORD);
-
-
- FUNCTION
- This function will add the x and y deltas to all gadget positions in a
- (dfunc) gadgetlist. This is useful when you make gadgets on the screen
- which should be moved a little. This command saves you lot of work
- altering all the positions in the gadgelist which can sometimes grow very
- big.
-
- INPUTS
- GadList - pointer to a gadgetlist of gadget structures (-1 terminated).
- x - delta x to list (-32K -> +32K)
- y - delta y to list (-32K -> +32K)
-
-
- SEE ALSO
- DFRenderGadgets()
-
-
- dfunc.library/DFDisable dfunc.library/DFDisable
-
- NAME
- DFDisable -- Dummy function for exec.library/Forbid().
-
- SYNOPSIS
-
- DFDisable()
-
-
- void DFDisable();
-
-
- FUNCTION
- This function is a dummy function for exec.library/Disable(). See the
- documentation for that function for more info. Disable system interrupts.
-
- SEE ALSO
- DFEnable(), exec.library/Format()
-
-
- dfunc.library/DFDosBase dfunc.library/DFDosBase
-
- NAME
- DFDosBase -- Returns pointer to dos.library base.
-
- SYNOPSIS
-
- dosbase=DFDosBase()
-
-
- struct dosbase *DFDosBase();
-
-
- FUNCTION
- This function will return the pointer to the dos.library base. The result
- can be used directly in A6 to call dos functions after this call.
-
- RESULTS
- dosbase - pointer to dos.library base
-
- SEE ALSO
- DFIntuitionBase(), DFGraphicsBase()
-
-
- dfunc.library/DFDrawI dfunc.library/DFDrawI
-
- NAME
- DFDrawI -- Render a image into rastport.
-
- SYNOPSIS
-
- DFDrawI(Rastport,Image,x ,y)
- a0 a1 d0 d1:16
-
- void DFDrawI(struct rastport *, struct image *, WORD, WORD);
-
-
- FUNCTION
- This function will draw an image into the rastport. The differences
- between this function and the intuition.library's, is that the image does
- not have to be in chipmem with this function. The function will handle
- that process internal and allocate and free a chipmem buffer if needed.
-
- INPUTS
- Rastport - pointer to a valid rastport
- Image - pointer to a image structure
- x - delta x
- y - delta y
-
- SEE ALSO
- intuition.library/DrawImage()
-
-
- dfunc.library/DFEnable dfunc.library/DFEnable
-
- NAME
- DFEnable -- Dummy function for exec.library/Permit().
-
- SYNOPSIS
-
- DFEnable()
-
-
- void DFEnable();
-
-
- FUNCTION
- This function is a dummy function for exec.library/Permit(). See the
- documentation for that function for more info. Enables system interrupts.
-
- SEE ALSO
- DFDisable(), exec.library/Permit()
-
-
- dfunc.library/DFFillWindow dfunc.library/DFFillWindow
-
- NAME
- DFFillWindow -- Fills a window with current APen.
-
- SYNOPSIS
-
- DFFillWindow(window,mode)
- a0 d0
-
- void DFFillWindow(struct window, ULONG);
-
-
- FUNCTION
- This function will fill a window with the current APen color. The window
- is cleared, filled and then the frames (if any) are redrawn.
-
- INPUTS
- window - pointer to a window
- mode - 0 = solid, 1=ghosted
-
- SEE ALSO
- DFSetPen(), graphics.library/SetAPen()
-
-
- dfunc.library/DFFindID dfunc.library/DFFindID
-
- NAME
- DFFindID -- Returns the gadget number of the gadget with the req. ID.
-
- SYNOPSIS
-
- gadgetnumber=DFFindID(GadList,ID)
- a0 d0
-
- WORD DFFindID(struct gadlist *, LONG);
-
-
- FUNCTION
- This function wil return the gadget number of the first gadget found with
- the requested ID. If no gadget has the ID null is returned.
-
- INPUTS
- GadList - pointer to list of gadget structures.
- ID - ID of the wanted gadget
-
- RESULTS
- gadgetnumber - gadget number in list with the requested ID.
-
- NOTES
- ID is not the same as gadget number.
-
- SEE ALSO
- DFGetID(), DFSetID()
-
-
- dfunc.library/DFFindScreen dfunc.library/DFFindScreen
-
- NAME
- DFFindScreen -- Find a screen in the screen list by name.
-
- SYNOPSIS
-
- screen=DFFindScreen(title)
- a0
-
- struct screen *DFFindScreen(STRPTR);
-
-
- FUNCTION
- This function will search for a screen in the screen list with the name
- [title]. The string must be null terminated. The title can be a part of
- the full title.
-
- INPUTS
- title - pointer to a null terminated string.
-
- RESULTS
- screen - pointer to the screen or NULL if not found
-
- EXAMPLE
-
- dc.b "Workb",0
-
- will find
-
- "Workbench screen"
-
- SEE ALSO
- DFFindWindow()
-
-
- dfunc.library/DFFindStrLen dfunc.library/DFFindStrLen
-
- NAME
- DFFindStrLen -- Count number of chars in a string.
-
- SYNOPSIS
-
- length=DFFindStrLen(string)
- a0
-
- length DFFindStrLen(STRPTR);
-
-
- FUNCTION
- This function will count number of characters in a null terminated string.
-
- INPUTS
- string - pointer to a null terminated string
-
- RESULTS
- length - length of string
-
- SEE ALSO
- graphics.library/TextLength()
-
-
- dfunc.library/DFFindTask dfunc.library/DFFindTask
-
- NAME
- DFFindTask -- Returns a pointer to a task structure.
-
- SYNOPSIS
-
- task=DFFindTask(taskname)
- a0
-
- structure task *DFFindTask(STRPTR);
-
-
- FUNCTION
- This function will try to find the task with the name taskname. To find
- your own task init a0 with zero. If the task could not be found the result
- will be NULL. This is a dummy function for the exec.library/FindTask().
-
- INPUTS
- taskname - pointer to a task name.
-
- RESULTS
- task - pointer to a task structure or NULL if taskname is not found.
-
- SEE ALSO
- exec.library/FindTask()
-
-
- dfunc.library/DFFindWindow dfunc.library/DFFindWindow
-
- NAME
- DFFindWindow -- Find a window in the window list by name (37.14).
-
- SYNOPSIS
-
- window=DFFindWindow(title)
- a0
-
- struct window *DFFindWindow(STRPTR);
-
-
- FUNCTION
- This function will search for a window in the window list with the name
- [title]. The string must be null terminated. The title can be a part of
- the full title.
-
- INPUTS
- title - pointer to a null terminated string.
-
- RESULTS
- window - pointer to a window or NULL if not found.
-
- SEE ALSO
- DFFindScreen()
-
-
- dfunc.library/DFFreeBitmap dfunc.library/DFFreeBitmap
-
- NAME
- DFFreeBitmap -- Frees a bitmap allocated with DFAllocBitmap().
-
- SYNOPSIS
-
- DFFreeBitmap(bitmap)
- a0
-
- void DFFreeBitmap(struct bitmap *);
-
-
- FUNCTION
- This function will free a bitmap which has been allocated with the
- DFAllocBitmap() function. It will free all bitplanes in the structure and
- free the bitmap structure from memory as well.
-
- INPUTS
- bitmap - pointer to bimap allocated with DFAllocBitmap()
-
-
- NOTES
- DO NOT try to free a bitmap in a screen structure. This will may hang or
- even crash your system. Only use this function with the DFAllocBitmap().
- You CAN use this function to free a bitmap you have set up your self, but
- do this on your own risk!
-
- SEE ALSO
- DFAllocBitmap()
-
-
- dfunc.library/DFFreeVMem dfunc.library/DFFreeVMem
-
- NAME
- DFFreeVMem -- Frees a buffer allocated with DFAllocVMem().
-
- SYNOPSIS
-
- DFFreeVMem(buffer)
- a0
-
- void DFFreeVMem(APTR);
-
-
- FUNCTION
- This function will free a bufer allocated with DFAllocVMem(). You don't
- need to give the size of the buffer. This is contained internally in the
- allocated buffer.
-
- INPUTS
- buffer - pointer to buffer allocated with DFAllocVMem()
-
- NOTES
- You can free this memory with exec.library/FreeMem(). If you choose to do
- this you have to recalculate the buffer position and size:
- execBuffer=buffer-4, size = (execBuffer).
-
- SEE ALSO
- DFAllocVMem(), DFGetVMemSize(), exec.library/FreeMem()
-
-
- dfunc.library/DFGetColors dfunc.library/DFGetColors
-
- NAME
- DFGetColors -- Gets flags of a gadget in a gadgetlist.
-
- SYNOPSIS
-
- ColAttr=DFGetColors(GadList,gad)
- a0 d0
-
- ULONG DFGetColors(struct GadList, LONG);
-
-
- FUNCTION
- This function will return the color attributes of a gadget in a gadgetlist.
-
- INPUTS
- GadList - pointer to a gadget list
- gad - gadget number in list (not same as ID)
-
- RESULTS
- ColAttr - color attributes of gadget
-
- SEE ALSO
- DFSetColors()
-
-
- dfunc.library/DFGetFileLength dfunc.library/DFGetFileLength
-
- NAME
- DFGetFileLength -- Returns the length of a file.
-
- SYNOPSIS
-
- length=DFGetFileLength(filename)
- a0
-
- ULONG DFGetFileLength(STRPTR);
-
-
- FUNCTION
- This function will read the filelength of a file and return it in D0.
- The function (a0) points to a null terminated string which contains the
- filename.
-
- INPUTS
- filename - points to filename[0]
-
- RESULTS
- length - length of file or NULL if any errors.
-
- SEE ALSO
-
-
- dfunc.library/DFGetFlags dfunc.library/DFGetFlags
-
- NAME
- DFGetFlags -- Gets flags of a gadget in a gadgetlist.
-
- SYNOPSIS
-
- Flags=DFGetFlags(GadList,gad)
- a0 d0
-
- ULONG DFGetFlags(struct GadList, LONG);
-
-
- FUNCTION
- This function will return the flag attributes of a gadget in a gadgetlist.
-
- INPUTS
- GadList - pointer to a gadget list
- gad - gadget number in list (not same as ID)
-
- RESULTS
- flags - flag attributes of gadget
-
- SEE ALSO
- DFSetFlags()
-
-
- dfunc.library/DFGetGFont dfunc.library/DFGetGFont
-
- NAME
- DFGetGFont -- Get a pointer to the font attribute gadget is using.
-
- SYNOPSIS
-
- FontAttr=DFGetGFont(GadList,gadget)
- a0 d0:16
-
- struct fontattr *DFGetGFont(struct gadgetlist *, UWORD);
-
-
- FUNCTION
- This function returns the pointer to a font attribute the gadget is using
- or null. The TextAttr can be set by using DFSetFont(). The render routine
- will automatically set the font of course, but it can be useful sometimes
- to analyse font activity for gui purposes.
-
- INPUTS
- GadList - pointer to a list of gadget structures.
- gadget - gadget number in list
-
- RESULTS
- FontAttr - pointer to a text attr or null
-
- SEE ALSO
- DFSetGFont(), DFSetFont()
-
-
- dfunc.library/DFGetID dfunc.library/DFGetID
-
- NAME
- DFGetID -- Gets the ID of a gadget.
-
- SYNOPSIS
-
- ID=DFGetID(GadList,gadget)
- a0 d0
-
- LONG DFGetID(struct gadlist *;, UWORD);
-
-
- FUNCTION
- This function will return the ID of a gadget or null if no ID found.
-
- INPUTS
- GadList - pointer to a list of gadget structures.
- gadget - gadget number in list
-
- RESULTS
- ID - ID of gadget
-
- NOTES
- ID is not the same as gadget number.
-
- SEE ALSO
- DFSetID(), DFFindID()
-
-
- dfunc.library/DFGetImage dfunc.library/DFGetImage
-
- NAME
- DFGetImage -- Gets a pointer to a image in a gadget.
-
- SYNOPSIS
-
- image=DFGetImage(GadList,gadget,no)
- a0 d0:16 d1:8
-
- struct image *DFGetImage(struct gadlist *, UWORD, UBYTE);
-
-
- FUNCTION
- This function will return a pointer to an image structure if gadget has
- any images. The no defines which of the gadget you want. 0 = upper image,
- 1=lower gadget or -1.
-
- INPUTS
- GadList - pointer to a list of gadget structures
- gadget - gadget number in list
- no - upper or lower image
-
- RESULTS
- image - pointer to an image structure, null or -1 if not an image
-
- NOTES
- Consider -1 to be a valid value when defining no=1. The -1 in the lower
- field of the gadget tells the render routine to not render any image when
- pressed. This would else be normal when defining an upper image as with
- upper texts.
-
- SEE ALSO
- DFSetImage()
-
-
- dfunc.library/DFGetMath dfunc.library/DFGetMath
-
- NAME
- DFGetMath -- Gets the FPU decimal name.
-
- SYNOPSIS
-
- fpu=DFGetMath()
-
-
- ULONG DFGetMath();
-
-
- FUNCTION
- This function will return the decimal name of the FPU (Floating Point
- Unit) on the machine used. The decimal values can be: 0 (no fpu),
- 68040 (FPU040, only on 68040/68060), 68882 and 68881.
-
- RESULTS
- fpu - decimal name on fpu or false if no fpu.
-
- SEE ALSO
- DFGetProc()
-
-
- dfunc.library/DFGetProc dfunc.library/DFGetProc
-
- NAME
- DFGetProc -- Returns the processor number.
-
- SYNOPSIS
-
- Processor=DFGetProc()
-
-
- ULONG DFGetProc();
-
-
- FUNCTION
- This function will return the decimal value of the processor the machine
- is running on. The value can be: 68000, 68010, 68020, 68030, 68040 and
- 68060 (!).
-
- RESULTS
- Processor - decimal value of processor name (680x0).
-
- SEE ALSO
- DFGetMath()
-
-
- dfunc.library/DFGetTitle dfunc.library/DFGetTitle
-
- NAME
- DFGetTitle -- Gets the pointer to a string in a gadget.
-
- SYNOPSIS
-
- string=DFGetTitle(GadList,gadget,no)
- a0 d0:16 d1:8
-
- STRPTR DFGetTitle(struct gadlist *, UWORD, UBYTE);
-
-
- FUNCTION
- This function will return the pointer to a string in gadget or null.
- Define which text in the gadget you want by setting the no to 0 or 1.
- 1 = the text when gadget is pressed.
-
- INPUTS
- GadList - pointer to a list of gadget structures.
- gadget - gadget number in list
- no - upper or lower text in gadget
-
- RESULTS
- string - pointer to a null terminated string or null.
-
- SEE ALSO
- DFSetTitle()
-
-
- dfunc.library/DFGetToggle dfunc.library/DFGetToggle
-
- NAME
- DFGetToggle -- Get the toggle state of a gadget.
-
- SYNOPSIS
-
- state=DFGetToggle(GadList,gadget)
- a0 d0
-
- BOOL DFGetToggle(struct gadlist *, UWORD);
-
-
- FUNCTION
- This function will return the toggle state of a gadget. This function
- will also return a state if you are using the dg_pressed flag for the
- gadget. This is because the render routine uses this flag to make it look
- pressed.
-
- INPUTS
- GadList - pointer to a gadget list
- gadget - gadget number in list
-
- RESULTS
- state - false if unpressed else true.
-
- SEE ALSO
- DFToggle(), DFRenderGadgets()
-
-
- dfunc.library/DFGetVMemSize dfunc.library/DFGetVMemSize
-
- NAME
- DFGetVMemSize -- Gets the size of a buffer allocated with DFAllocVMem()
-
- SYNOPSIS
-
- size=DFGetVMemSize(buffer)
- a0
-
- ULONG DFGetVMemSize(APTR);
-
-
- FUNCTION
- This function returns the size of a buffer allocated with DFAllocVMem().
- It can also be used with the DFLoadFile() function.
-
- INPUTS
- buffer - pointer returned by DFAllocVMem()
-
- RESULTS
- size - size of buffer
-
- NOTES
- There is no error checking so be sure that the pointer you give to this
- function is to a buffer allocated with DFAllocVMem() or you may get wild
- result.
-
- SEE ALSO
- DFFreeVMem(), DFAllocVMem(), DFLoadFile()
-
-
- dfunc.library/DFGhostGads dfunc.library/DFGhostGads
-
- NAME
- DFGhostGads -- Sets all gadget in a list to ghost or nonghost mode.
-
- SYNOPSIS
-
- DFGhostGads(gadgets,mode)
- a0 d0
-
- void DFGhostGads(APTR, UBYTE);
-
-
- FUNCTION
- This function will toggle all gadgets in a gadget list to either ghosted
- or no-ghosted depended on the mode. Mode 0 means ghost, and mode 1 is
- no ghosting.
-
- INPUTS
- gadgets - pointer to a gadget list
- mode - 0 = ghost, 1 = no ghosting
-
- SEE ALSO
- DFSetFlags(), DFGetFlags()
-
-
- dfunc.library/DFGraphicsBase dfunc.library/DFGraphicsBase
-
- NAME
- DFGraphicsBase -- Returns pointewr to graphics.library base.
-
- SYNOPSIS
-
- gfxbase=DFGraphicsBase()
-
-
- struct graphics *DFGraphicsBase();
-
-
- FUNCTION
- This function returns the pointer to the graphics.library base. The result
- can be used directly in A6 to call functions from the graphics.library
- after this call.
-
- RESULTS
- gfxbase - pointer to graphics.library base
-
- SEE ALSO
- DFDosBase(), DFIntuitionBase()
-
-
- dfunc.library/DFInitScale dfunc.library/DFInitScale
-
- NAME
- DFInitScale -- Inits a scale for gadgets in a window.
-
- SYNOPSIS
-
- Scale=DFInitScale(Window,GadList)
- a0 a1
-
- struct Scale *DFInitScale(struct Window *, struct GadList);
-
-
- FUNCTION
- This function will initialize a special structure to use with gadgets if
- you want to have them scaled when the window resizes.
-
- INPUTS
- Window - pointer to a window
- GadList - pointer to a gadget list
-
- RESULTS
- Scale - pointer to a private structure or NULL if failure.
-
- NOTES
- Do not modify the scale structure in any way. It's private!
-
- SEE ALSO
- DFScaleGads(), DFRemScale()
-
-
- dfunc.library/DFIntuitionBase dfunc.library/DFIntuitionBase
-
- NAME
- DFIntuitionBase -- Returns pointer to intuition.library base.
-
- SYNOPSIS
-
- intuitionbase=DFIntuitionBase()
-
-
- struct intuition *DFIntuitionBase();
-
-
- FUNCTION
- This function returns the pointer to the intuition.library base. The
- result can be used directly in A6 to call functions from the
- intuition.library after this call.
-
- RESULTS
- intuitionbase - pointer to intuition.library base
-
- SEE ALSO
- DFDosBase(), DFGraphicsBase()
-
-
- dfunc.library/DFLine dfunc.library/DFLine
-
- NAME
- DFLine -- Draws a line in APen color in rastport.
-
- SYNOPSIS
-
- DFLine(rastport,x1,y1,x2,y2)
- a0 d0 d1 d2 d3:16
-
- void DFLine(struct rastport *, WORD, WORD, WORD, WORD);
-
-
- FUNCTION
- This function will draw a line from x1,y1 to x2,y2 in a valid rastport.
-
- INPUTS
- rastport - pointer to a valid rastport (preferable a window rasport)
- x1 - x start position
- y1 - y start position
- x2 - x end position
- y2 - y end position
-
- SEE ALSO
-
-
- dfunc.library/DFLoadFile dfunc.library/DFLoadFile
-
- NAME
- DFLoadFile -- Will allocate a buffer and load a file into it.
-
- SYNOPSIS
-
- fileptr=DFLoadFile(filename)
- a0
-
- APTR DFLoadFile(STRPTR);
-
-
- FUNCTION
- This function will allocate a buffer for the file in the same size as the
- file and then load the content of the file into it. It actual returns the
- length of the buffer/file in D1.
-
- INPUTS
- filename - points to filename string[0]
-
- RESULTS
- fileptr - points to beginning of buffer with file in it or NULL if error
- D1 - returns the length of the file
-
- NOTES
- Do not free this memory area with exec.library/FreeMem() or any similar
- functions. The buffer contains a private structure. Use the DFRemFile()
- function to remove the file from memory.
-
- BUGS
- Function will return filelength, but it is 4 bytes too long!
-
- SEE ALSO
- DFRemFile(), DFGetVMemSize()
-
-
- dfunc.library/DFLoadRGB4 dfunc.library/DFLoadRGB4
-
- NAME
- DFLoadRGB4 -- Dummy function for graphics.library/LoadRGB4.
-
- SYNOPSIS
-
- DFLoadRGB4(screen,colors,no)
- a0 a1 d0
-
- void DFLoadRGB4(struct screen *, APTR, UWORD);
-
-
- FUNCTION
- This function sets the colors to a screen in 16 bit format. It's a dummy
- routine for graphics.library/LoadRGB4() just that here we use screen
- instead og viewport. Later there will come a function for all color
- formats and the routine will recode a 16 bit color code to a 32 bit value
- etc.
-
- INPUTS
- screen - pointer to a screen
- colors - pointer to color values buffer
- no - number of colors to set
-
- SEE ALSO
- graphics.library/LoadRGB4()
-
-
- dfunc.library/DFLowerCase dfunc.library/DFLowerCase
-
- NAME
- DFLowerCase -- Will turn all chars in a buffer to lower case.
-
- SYNOPSIS
-
- DFLowerCase(buffer,size)
- a0 d0
-
- void DFLowerCase(APTR, ULONG);
-
-
- FUNCTION
- This function will convert all letters in a buffer to lowercase. The
- routine will also handle foreign chars. like eg. æ, ø, å etc.
-
- INPUTS
- buffer - pointer to start address
- size - size of buffer (can be >=1)
-
- SEE ALSO
- DFUpperCase()
-
-
- dfunc.library/DFMakeAscii dfunc.library/DFMakeAscii
-
- NAME
- DFMakeAscii -- Removes all special signs from a buffer.
-
- SYNOPSIS
-
- DFMakeAscii(buffer,size,mode)
- a0 d0 d1
-
- void DFMakeAscii(APTR, ULONG, UBYTE);
-
-
- FUNCTION
- This function will removes all special signs in a buffer. There are two
- ways of doing it: 1 - replace the special signs with a point (.) (mode 0),
- or truncate the buffer and return the new size (mode 1).
-
- INPUTS
- buffer - pointer to a buffer
- size - size of buffer
- mode - 0 = replace, 1 = truncate
-
- RESULTS
- newSize - if mode 1 is set, then newsize of buffer will return in d0.
-
- SEE ALSO
-
-
- dfunc.library/DFMakeBool dfunc.library/DFMakeBool
-
- NAME
- DFMakeBool -- Will pack to values into a long word.
-
- SYNOPSIS
-
- packet=DFMakeBool(value1,value2)
- d0:16 d1:16
-
- ULONG DFMakeBool(WORD, WORD);
-
-
- FUNCTION
- This function will pack to words into a longword setting the first value
- in the high 16 bits and the second value in the 16 lower bits.
-
- INPUTS
- value1 - value 1 word size
- value2 - value 2 word size
-
- RESULTS
- packet - long word containing the two words.
-
- SEE ALSO
- DFStripBool()
-
-
- dfunc.library/DFMakeRastport dfunc.library/DFMakeRastport
-
- NAME
- DFMakeRastport -- Allocates a bitmap and inits a rastport in a buffer.
-
- SYNOPSIS
-
- success=DFMakeRastport(buffer,width,height,depth)
- a0 d0:16 d1:16 d2:8
-
- BOOL DFMakeRastport(APTR, UWORD, UWORD, UBYTE);
-
-
- FUNCTION
- This function will try to allocate a bitmap and init a rastport. It will
- fail if there are not enough memory.
-
- INPUTS
- buffer - pointer to a buffer big enough to keep a rastport structure.
- width - width of bitmap
- height - height of bitmap
- depth - depth of bitmap
-
- RESULTS
- rastport - true is success or false if any failure (memory).
-
- SEE ALSO
- DFRemRastport(), intuition/rastport.i
-
-
- dfunc.library/DFNewPrintText dfunc.library/DFNewPrintText
-
- NAME
- DFNewPrintText -- Print an ascii text to a window.
-
- SYNOPSIS
-
- DFNewPrintText(window,text,x ,y ,mode)
- a0 a1 d0 d1 d2
-
- void DFNewPrintText(struct window *, APTR, WORD, WORD, UBYTE);
-
-
- FUNCTION
- This function will print an ascii text buffer in the rastport. The text
- points to a buffer which contains the whole text terminated with a null.
- This routine allows linefeeds as well. The mode value tells the routine
- if the text should be centered or not, null is normal.
-
- INPUTS
- window - pointer to a window
- text - pointer to a null terminated text buffer
- x - delta x start
- y - delta y start
- mode - 0 = normal, 1 = center, 2 = right
-
-
- NOTES
- Use this function instead of DFPrintText()!
-
- BUGS
- Mode 2 not yet implemented!
-
-
- dfunc.library/DFNewProcess dfunc.library/DFNewProcess
-
- NAME
- DFNewProcess -- Starts code as a new process.
-
- SYNOPSIS
-
- success=DFNewProcess(code,name)
- a0 a1
-
- BOOL DFNewProcess(APTR, STRPTR);
-
-
- FUNCTION
- This function will try to start a code as a new process. This function is
- really just a dummy function for the dos.library/NewProcess(). It will
- init the taglist and parameters for you. For more advanced use you would
- prefer to use the dos function. This function just intend to make it more
- simplier for you using the process function.
-
- INPUTS
- code - pointer to a valid MC680x0 code.
- name - pointer to a nullterminated string.
-
- RESULTS
- success - true with success, false if any failure.
-
- SEE ALSO
-
-
- dfunc.library/DFOpenXWindow dfunc.library/DFOpenXWindow
-
- NAME
- DFOpenXWindow -- Opens a X look-alike window [private].
-
- SYNOPSIS
-
- xwindow=DFOpenXWindow(tags)
- a0
-
- struct xwindow *DFOpenXWindow(APTR);
-
-
- FUNCTION
- This function will try to open a window which will look like the X
- windows. The returned pointer is a pointer to a normal window with the
- userdata field initialized. The structure userdata points to is private.
-
- INPUTS
- tags - pointer to normal window tags + x tags.
-
- RESULTS
- xwindow - pointer to a window with userdata.
-
- NOTE
- It is important that you have the X window server running. This function
- will not work properly if not. The server will control the sizing and
- gadgets for the x window. The server is a seperate binary program which
- should follow this archive!
-
- SEE ALSO
- DFRefreshXFrame(), DFCloseXWindow(),
- intuition.library/OpenWindowTagList(), intuition/intuition.i
-
-
- dfunc.library/DFPrinterCommand dfunc.library/DFPrinterCommand
-
- NAME
- DFPrinterCommand -- Send a command to the printer.
-
- SYNOPSIS
-
- success=DFPrinterCommand(command)
- d0
-
- BOOL *DFPrinterCommand(ULONG);
-
-
- FUNCTION
- This function will send a command to the printer. You obtain the command
- number from the command list. Eg. Command=1 is set Boldface etc.
-
- INPUTS
- command - command number (from list).
-
- RESULTS
- success - false if failure else true.
-
- NOTES
- The list is a private list and can not be compared to global lists like
- the ANSI sequence list.
-
- BUGS
- Not implemented yet.
-
- SEE ALSO
- DFPrinterText(), DFPrinterWindow()
-
-
- dfunc.library/DFPrinterText dfunc.library/DFPrinterText
-
- NAME
- DFPrinterText -- Prints a text to PRT:.
-
- SYNOPSIS
-
- success=DFPrinterText(text)
- a0
-
- BOOL *DFPrinterText(APTR);
-
-
- FUNCTION
- This function will print a text contaning ascii and ansi sequences (if
- wanted) to the prt: (printer). The text must be null terminated. It's much
- like using for example c:type <text> >prt: .
-
- INPUTS
- text - pointer to a null terminated text buffer.
-
- RESULTS
- success - false if failure else true.
-
- SEE ALSO
- DFPrinterCommand(), DFPrinterWindow()
-
-
- dfunc.library/DFPrinterWindow dfunc.library/DFPrinterWindow
-
- NAME
- DFPrinterWindow -- Prints the rastport of a window.
-
- SYNOPSIS
-
- success=DFPrinterWindow(tags)
- a0
-
- BOOL *DFPrinterWindow(struct tagitem *);
-
-
- FUNCTION
- This function will try to print portions of the window rastport to the
- printer. The printer must support graphics. The taglist decide how the
- area will defined, positive/negative, aspects etc.
-
- INPUTS
- tags - pointer to a taglist
-
- RESULTS
- success - false if failure else true.
-
- NOTES
- Needs printer.device and a printer which support graphics.
-
- BUGS
- Not yet implemented.
-
- SEE ALSO
- DFPrinterCommand(), DFPrinterText()
-
-
- dfunc.library/DFPrintF dfunc.library/DFPrintF
-
- NAME
- DFPrintF -- Formats a string and print it in rastport.
-
- SYNOPSIS
-
- DFPrintF(rastport,string,input,buffer, x, y)
- a0 a1 a2 a3 d0 d1
-
- void DFPrintF(struct rastport *, STRPTR, APTR, APTR, WORD, WORD);
-
-
- FUNCTION
- This function will format the input data into the string and then print it
- into the rastport at position x and y. The input points to a pointer
- table. The table consist of as many pointers as there are format signs in
- the string. Follow the normal exec.library/RawDoFmt() rules. The buffer
- must be big enough to contain the formatted string.
-
- INPUTS
- rastport - pointer to a (window) rastport
- string - pointer to a null terminated string
- input - pointer to pointer or value table
- buffer - pointer to a temp buffer
- x - x position in rastport
- y - y position in rastport
-
-
- EXAMPLE
-
- Here is an example in assembler code:
-
- incdir "includes:"
- include "dfunc/dfunc_lib.i"
- include "exec/exec_lib.i"
-
- Start move.l a0,-(sp)
-
- move.l $4.w,a6 ;execbase
- moveq #37,d0 ;version
- lea DFuncName(pc),a1 ;pointer to lib name
- jsr _LVOOpenLibrary(a6) ;open our library
- move.l d0,DFuncBase
- beq.b .exit
-
- move.l DFuncBase(pc),a6
-
- move.l Rastport(pc),a0
- lea String(pc),a1
- lea Input(pc),a2
- lea Buffer(pc),a3
- moveq #0,d0
- move.w #140,d1
- jsr _LVODFPrintF(a6)
-
- move.l a6,a1
- move.l $4.w,a6
- jsr _LVOCloseLibrary(a6)
-
- .exit move.l (sp)+,a0
- moveq #0,d0
- rts
-
- Rastport dc.l 0
- DFuncBase dc.l 0
-
- String dc.b "This number: %ld is a %s number indeed!",0
- even
-
- Input dc.l 12000 ;number we will see in string
- dc.l Hughtext ;pointer to text to put in
-
- HughText dc.b "Huge",0 ;the text to put in string
- even ;align to even address
-
- Buffer dcb.b 128,0 ;buffer is here 128 bytes
-
- DFuncName dc.b "dfunc.library",0
- ---
-
- SEE ALSO
- exec.library/RawDoFmt()
-
-
- dfunc.library/DFPrintText dfunc.library/DFPrintText
-
- NAME
- DFPrintText -- Print an ascii text into rastport (obsolete).
-
- SYNOPSIS
-
- DFPrintText(rastport,text, x, y, mode)
- a0 a1 d0 d1 d2:8
-
- void DFPrintText(struct rastport *, APTR, WORD, WORD, UBYTE);
-
-
- FUNCTION
- This function will print a ascii text buffer in the rastport. The text
- points to a buffer which contains the whole text terminated with a null.
- This routine allows linefeeds as well. The mode value tells the routine if
- the text should be centered or not, null is normal.
-
- INPUTS
- rastport - pointer to a (window) rastport
- text - pointer to a null terminated text buffer
- x - horizontal position to print text from
- y - vertical position (top of text) to print from
- mode - 0 = normal, 1 = center text with delta x
-
- NOTES
- Do not use this function anymore. Use DFNewPrintText() instead.
-
- SEE ALSO
- DFPrintTxt2()
-
-
- dfunc.library/DFPrintTxt2 dfunc.library/DFPrintTxt2
-
- NAME
- DFPrintTxt2 -- Will print a single string into rastport.
-
- SYNOPSIS
-
- DFPrintTxt2(rastport,text, x, y)
- a0 a1 d0 d1
-
- void DFPrintTxt2(struct rastport *, STRPTR, WORD, WORD);
-
-
- FUNCTION
- This function will print a null terminated string into the rastport. The x
- and y values represent the position of the text in the rastport. The
- routine does not add kernal of the current font to the y value.
-
- INPUTS
- rastport - pointer to a (window) rastport
- text - pointer to a null terminated string
- x - horizontal start position related to rastport
- y - vertical start position related to rastport
-
-
- SEE ALSO
- DFPrintText()
-
-
- dfunc.library/DFReadArg dfunc.library/DFReadArg
-
- NAME
- DFReadArg -- Stripps an argument from a argstring and terminates it.
-
- SYNOPSIS
-
- argend=DFReadArg(string,dstBuffer)
- a0 a1
-
- STRPTR *DFReadArg(STRPTR, APTR);
-
-
- FUNCTION
- This function will parse an argument string and stripp one argument at a
- time. It will also remove whitespaces from the argument and handles quotes
- as well (they will also be removed).
-
- INPUTS
- string - pointer to a argument string (terminated with null or linefeed).
- dstBuffer - pointer to the buffer you want the stripped argument. The
- argument will be null terminated and contain no quotes.
-
- RESULTS
- arg - points to after argument in argument string. Use this value to get
- the next arg from the argstring in <string>.
- It will return NULL if end of argument string.
-
- SEE ALSO
- DFCalcArg()
-
-
- dfunc.library/DFRefreshXFrame dfunc.library/DFRefreshXFrame
-
- NAME
- DFRefreshXFrame -- Refreshes the frame of a X window [private].
-
- SYNOPSIS
-
- success=DFRefreshXFrame(xwindow)
- a0
-
- BOOL DFRefreshXFrame(struct xwindow);
-
-
- FUNCTION
- This function will try to refresh the frame of a X window opended by
- DFOpenXwindow(). If the pointer doesn't point to a X window the function
- will return false (null). If the window is not a X window it will take a
- normal intuition.library/RefreshWindowFrame().
-
- INPUTS
- xwindow - pointer to a X window
-
- RESULTS
- success - true if x window, false if not a x window
-
- SEE ALSO
- DFOpenXwindow(), DFCloseXwindow(), intuition.library/RefreshWindowframe()
-
-
- dfunc.library/DFRemFile dfunc.library/DFRemFile
-
- NAME
- DFRemFile -- Free memory area for loaded file.
-
- SYNOPSIS
-
- DFRemFile(filebuffer)
- a0
-
- void DFRemFile(APTR);
-
-
- FUNCTION
- This function will free any memory allocated with DFLoadFile().
-
- INPUTS
- filebuffer - pointer returned by DFLoadFile()
-
- SEE ALSO
- DFLoadFile()
-
-
- dfunc.library/DFRemRastport dfunc.library/DFRemRastport
-
- NAME
- DFRemRastport -- Removes a rastport and bitmap init by DFMakeRastport().
-
- SYNOPSIS
-
- DFRemRastport(rastport)
- a0
-
- void DFRemRastport(struct rastport *);
-
-
- FUNCTION
- This function will remove the rastport made by DFMakeRastport(). It will
- free any bitplanes in the bitmap and scramble the rastport structure.
-
- INPUTS
- rastport - pointer to a rastport buffer init by DFMakeRastport().
-
-
- NOTES
- DO NOT use this function on a rastport allocated by OpenScreen() or
- similar. It will may hang up your system or crash it.
-
- SEE ALSO
- DFMakeRastport()
-
-
- dfunc.library/DFRemScale dfunc.library/DFRemScale
-
- NAME
- RemScale -- Removes a valid scale structure.
-
- SYNOPSIS
-
- RemScale(scale)
- d0
-
- void RemScale(struct scale *);
-
-
- FUNCTION
- This function will remove the allocated scale structure initialized by
- InitScale().
-
- INPUTS
- scale - pointer to a valid scale structure.
-
- SEE ALSO
- InitScale()
-
-
- dfunc.library/DFRenameTask dfunc.library/DFRenameTask
-
- NAME
- DFRenameTask -- Renames a task or process.
-
- SYNOPSIS
-
- oldName=DFRenameTask(task,newTask)
- a0 a1
-
- STRPTR DFRenameTask(structure task *, STRPTR);
-
-
- FUNCTION
- This function will try to rename a task. It will return a pointer to the
- old name. It's recommended that you set back the old name before you exit.
-
- INPUTS
- task - pointer to taskstructure
- newTask - pointer to a null terminated string with the new task name.
-
- RESULTS
- oldName - pointer to the old name.
-
- SEE ALSO
-
-
- dfunc.library/DFRenderGadgets dfunc.library/DFRenderGadgets
-
- NAME
- DFRenderGadgets -- render gadget list into rastport.
-
- SYNOPSIS
-
- DFRenderGadgets(Rastport, gadgetList)
- a0 a1
-
-
- void DFRenderGadgets(struct Rastport *, APTR);
-
-
- FUNCTION
- This function will render your gadget list into a valid rastport.
- The gadgetList contains one or more structures in an array with -1
- to terminate the structure array.
-
- dg_Pressed - This flag will make the gadget look pressed all the time.
- This flag has really no use for the programmer and it is usally
- used internally by the toggle function in the library to set or
- unset a gadget. It is also used when a gadget is pressed by
- mouse or by a hotkey.
- dg_Inpressable - This flag will make the gadget untouchable. It will
- thow return the result in D0 and A0 as normal when using WaitMsg()
- but it will not toggle graphical.
- dg_Invisable - This gadget will not be rendered, but the hotzone is
- still active. This mean you can define an area on a picture for
- instance which will have a hotzone. Useful in multimedia
- applications. If you use dg_Invisable then the dg_Top, dg_Left,
- dg_Width and the dg_Height fields do not have to be initialized.
- The routine will skip rendering the gadget and these fields will
- not be read. This flag is useful when using muti hotkeys for some
- functions like exit which can be escape, amiga+q etc. Define one
- gadget for each of these combinations and your application will be
- very userfriendly.
- dg_Ghosted - This will ghost the gadget and make it inpressable. The
- differences between this flag and the dg_Inpressable flag, are
- that with this flag the gadget gets a graphic change and you will
- get no returns with the WaitMsg() function.
- dg_Inscalable - This flag will not allow the gadget to be rescaled
- if the window gets resized. The position will be adjusted anyhow.
- Note that the font will not (at this time) be rescaled, but this
- will maybe be fixed in future version of the dfunc.library.
- dg_NoBorder - With this flag set the gadget will be rendered with no
- highlite and shadow borders. Useful for graphic designs where you
- can predraw your own borders.
- dg_NoBack - This make the gadget transperant. The borders will be
- drawn and the text as well. NOTE: If you use two different texts
- on the gadget you have to suit for to render the background of the
- gadget yourself, or use an image which will cover the text area.
- The gadgets are rendered with Jam0 mode and the texts will mix if
- you don't suit for background. With one text only this will be no
- problem.
- dg_DblBorderV - This will render the gadget with double borders
- vertically. Useful on hi-res nolace screens. Since we don't use
- any DisplayInfo for the gadgets we have to initialize the borders
- our self, but then again we are more flexible to design them the
- way we want them and that is some of the strength of this library.
- dg_DblBorderH - This will render the gadget with double borders
- horizontally. Useful on lo-res interlaced screens.
- dg_Picture - This flag allows you to use a bitmap or rastport to
- fill the background of the gadget with. This is at the moment
- not in use and will have no effect in this version of the
- dfunc.library. FUTURE expansion (see the dg_Extended flag).
- dg_Pattern - This flag will allow you to use a image to fill the
- gadget area (not yet available). FUTURE!
- dg_TextLeft - This flag will render the text from left + 4 pixels in
- the gadget. The default for a gadget is center.
- dg_TextRight - This will render the gadget with text from right
- border minus 4 pixels.
- dg_TextShadow - If you want shadow on your text (1 pixel X/Y), you
- use this flag. The shadow color is the same as the BorderShadow.
- dg_HotKey - This allow you to use keys to activate the gadgets instead
- of the mouse. This system uses IDCMP_ValillaKey which will restrict
- the possibilities a little, but not as much so it will be useless.
- You can set these hotkeys in the dg_Title1 string:
-
- . - No qualifier. This will allow no key combinations with the
- main key, just the key following the "." .
- A - You have to press lalt or ralt with the characterkey. The
- result of this combination have to be the same character as
- requested. This is for every hotkey states since we're using
- IDCMP_VanillaKey.
- L - Use lAmiga in combination with the key.
- R - Use rAmiga incombination with the key.
- S - Use one of the shiftkeys in combination with the key.
- Here you usally have to use the dg_Insensitive flag to get
- the right vanilla key.
- C - Use control key in combination with the requested key. This
- qualifier will rarely return a keycode simular to the
- requested key and therefor this qualifier is of no use.
- If you setting none of these qualifier flags, you can use any
- combination you like as long as the result is the same as the
- requested key.
-
- Examples:
-
- dc.b ".sTesting",0
- This will only allow the s key to activate the gadget. The
- character "s" in Testing will get an underscore.
-
- dc.b "sTesting",0
- This will allow any combination with the s as long as the result
- is a 's'.
-
- dc.b "RiTesting",0
- Press rAmiga + i to activate the gadget. The "Ri" text will not
- show in the gadget.
-
- dc.b "SnTesting",0
- Press Shift + n to activate gadget. To make the shift combination
- work, you have to use the dg_Insensitive flag.
-
- dc.b "R",134,"Testing",0
- This will combine the rAmiga with a key producing the ascii code
- 134. This will ofcourse result a underscore for the gadget text,
- but you can use it to get the key you want.
-
- If the hotkey used is found in the main text, you will get an
- underscore at the gadget.
- The DFWaitGad() will not "eat" the message even if a hotkey is used
- which means you can use the message returned for your own use.
-
- If you are using the same hotkey in another gadget, the first gadget
- with the hotkey in the gadList will be activated while the others
- will be ignored.
-
- Since the routine uses IDCMP_VANILLAKEY you cannot use the F1-F10,
- HELP, arrow keys or qualifiers alone. There will be developed a new
- routine to check for IDCMP_RawKeys. This routine will be named
- DFWaitGadR(). This function is currently unavailable!
-
- dg_Insensitive - This will uppercase all characters for hotkey use
- internally allowing the Shift keys to be used as a qualifier.
- This is necessary because the gadgets are using VanillaKey and
- not RawKeys. Use the DG_HotKeyS macro for default actions of your
- gadgets if you want hotkeys.
- dg_ShadowBottom - This is a design flags exlusive for the dfunc
- gadgets. This will render the gadgets with a shadow at bottom
- so it will look like it is more near the user than the rest of
- the screen. Use it in combination with the dg_ShadowRight and
- the dg_ShadowCorner flag. When gadget is pressed the shadow
- is removed with the background pen, so that means you can put
- these gadgets on any background you like (not pictures etc.) and
- the shadow look will work alright.
- dg_ShadowRight - The same as the dg_ShadowBottom flag, but this will
- draw a shadow at the right side of the gadget.
- dg_ShadowCorner - This flag is only useful if you are using only one
- of the above shadow flags. This has a design purpose in mind. If
- you making a grid of gadgets this is useful to make the gadgets
- shadow look realistic. Experiment!
- dg_ImageRight - If you are using images for your gadgets, this flag
- will make the image appear at the right side of the gadget.
- Default is left side. You don't have to worry about deltas, cause
- those will be calculated reversed.
- dg_ImageCenter - This flag will draw the image in the center of the
- gadget. Fine adjust using the deltas in the image structure.
- dg_Extended - This flag will tell the render routine that more flags
- are applied to the gadget in the dg_Link field. This flag does
- nothing yet. DO NOT USE THIS FLAG UNTIL NOTICED!
- dg_Movable - this flag allow you to take action when holding down the
- mousebutton over the gadget. More information below.
- dg_Mask - When this flag is set you can use the dg_link field to point
- to a 2 color image structure. This image can be used as a mask
- field for the gadget. Pressing at a point which a bit is set will
- give result, if none bit are set the result will be false as if
- the gadget where not pressed. The routine will only consider 1
- bitplane of the image structure. It is recommended that the image
- is as big as the gadget area.
-
-
- Texts (for dg_Title1 and the dg_Title2 fields):
-
- If the textlength gets bigger then the width or height of the gadget
- it will not be drawn. This not a exclution of the routine, but a side
- effect of the calculation routine. The text will be drawn in a unknown
- area of the rastport (don't use screen rastport!). The calculation is
- done as this so it will get most speed of the computer so it is your
- responsibility to suit for your text to fit within the gadgets border
- limits. The render routine are aware of the width on different fonts
- so don't worry about that.
-
- You can define pixel deltas for the text if you want to display it
- different than calculated. This is how:
-
- NOTE: DO NOT USE THIS FACILITY! IT WILL BE CHANGED!
-
- dc.b $A,$-5,"Text",0
- This will add 10 pixels to the X and -5 pixels to the Y.
-
- dc.b 4,"Text",0
- This will add 4 pixels to the X.
-
- dc.b "Text",0
- This will do nothing extra.
-
- NOTE: If you are using DG_HOTKEY, the hotkey MUST be defined first! :
-
- dc.b ".x",6,7,"Text",0
-
- Another thing to remember is that the values have to be less than
- 32 and larger than -128 (the other values are used as text..).
-
- For countries who uses "æ", "ø", "å" etc. this will collide. To solve
- this add a space in front of your text. The special characters are in
- the position area of the ascii value. This will be fixed later and we
- recommend you to NOT USE this feature yet! It is currently functional,
- but we may change the behaviour in the future to able special signs
- users to get some comfort.
-
- Images (the dg_Image1 and dg_Image2 fields):
-
- With the dfunc.library you don't have to worry about having your
- image buffers in chipmem. You can as well have them in FAST/PUBLIC.
- The routine will find out if chip is needed, make a buffer, copy the
- image to the chip buffer and then render it. You will not notice any
- speed delays as long as the images aren't to big. If so make a hunk
- section for chipmem or allocate a buffer with AllocMem(). This will
- work with graphics card as well.
-
- If you don't want any images appearing in pressed state, use -1 in the
- dg_Image2 field.
-
- CYCLEKIND:
- Not yet available!
-
- PROCESSKIND:
-
- Initalize a pointer to your code in the dg_Link field. The code will
- then be started when the gadget is released active. There is two ways
- of activating your code. 1: A jump call which is ended with an RTS, or
- you can start your code as an own process. To take advantage of the
- last one, use the DG_PROCTASK. If you use this methode the gadget will
- return control to your program immediatly at the same time as your
- dg_Link code will be started independent. We will recommend you to
- control your new task with flags else you'll get a new task everytime
- you press the Process gadget. The task is named as the text of the
- dg_Title1 field.
-
- MOVABLE:
-
- This gadgettype is meant to allow custom handling og the gadget. When
- this flag is set (DG_MOVABLE) the gadget is released at once when
- pressing the gadget. This allow you to take custom action on it, for
- example, move the positions. Combining this flag with the process kind
- flag can make powerful gadgets. Eg. Workbench emulation to mention
- something.
-
- SLIDERKIND:
- Not yet available!
-
- TEXTKIND:
- Not yet available!
-
- NUMERICKIND:
- Not yet available!
-
-
- INPUTS
- Rastport - pointer to a valid (window) rastport
- gadgetList - pointer to the beginning of a terminated structure list
-
- RESULTS
- none
-
- SEE ALSO
- DFWaitGad(), DFDeltaList(), DFUpdateGad()
-
-
- dfunc.library/DFReverseBuffer dfunc.library/DFReverseBuffer
-
- NAME
- DFReverseBuffer -- Reverses a buffer.
-
- SYNOPSIS
-
- DFReverseBuffer(buffer,length)
- a0 d0
-
- void DFReverseBuffer();
-
-
- FUNCTION
- This function will reverse the bytes in a buffer with the alorithm:
- (pseduo)
-
- Byte1(buffer+pos) -> temp
- Byte2(Buffer+length-pos+1) -> Byte1(buffer+pos)
- temp -> Byte2(Buffer+length-pos+1)
- pos=pos+1
- if pos=int(length/2) then exit
-
- INPUTS
- buffer - pointer to a buffer
- length - length of buffer
-
- NOTES
- Length of buffer must be more than 1 byte!
-
- dfunc.library/DFSaveBuffer dfunc.library/DFSaveBuffer
-
- NAME
- DFSaveBuffer -- Saves a memory buffer to a file.
-
- SYNOPSIS
-
- success=DFSaveBuffer(filename,buffer,size)
- a0 a1 d0
-
- BOOL *DFSaveBuffer(STRPTR, APTR, ULONG);
-
-
- FUNCTION
- This function will save a memory buffer to a file. The contents of the
- buffer not be modified in any way so the file will be a raw file.
-
- INPUTS
- filename - points to a filename string[0]
- buffer - points to start address to save from
- size - size of buffer to save
-
- RESULTS
- success - true if ok, false if any errors
-
- SEE ALSO
-
-
- dfunc.library/DFSaveIFF dfunc.library/DFSaveIFF
-
- NAME
- DFSaveIFF -- Saves a bitmap as an IFF file.
-
- SYNOPSIS
-
- succeed=DFSaveIFF(Screen,filename,mode)
- a0 a1 d0
-
- BOOL *DFSaveIFF(struct screen *, STRPTR, ULONG);
-
-
- FUNCTION
- This function will attempt to save a bitmap in the a screen as an IFF ILBM
- file. Currently it will be uncompressed, but you can load it into an art
- package and resave it and it will be compressed.
-
- INPUTS
- Screen - pointer to a screen
- filename - pointer to a NULL terminated string containg filename
- mode - set this to null. Currently only uncompressed pictures are
- supported. You may use 1 if you want your pictures compressed in
- the future.
-
- RESULTS
- succeed - true if success, false if any error
-
- SEE ALSO
- DFLoadIFF() [currently private]
-
-
- dfunc.library/DFScaleGads dfunc.library/DFScaleGads
-
- NAME
- ScaleGads -- Scales a gadget list when called.
-
- SYNOPSIS
-
- ScaleGads(scale)
- d0
-
- void ScaleGads(struct scale *);
-
-
- FUNCTION
- This function is called when you get message about window resize or window
- zip. It will then scale the gadgets and redraw them into your window.
-
- INPUTS
- scale - pointer to a valid scale structure returned by InitScale()
-
- NOTES
- The window will be cleared before scaling so you have to suit for your
- self to redraw any graphics which got nothing to do with the gadgets.
-
- SEE ALSO
- InitScale()
-
-
- dfunc.library/DFScreenOfWindow dfunc.library/DFScreenOfWindow
-
- NAME
- DFScreenOfWindow -- Returns a pointer to the screen containing window.
-
- SYNOPSIS
-
- screen=DFScreenOfWindow(window)
- a0
-
- struct screen *DFScreenOfWindow(struct window *);
-
-
- FUNCTION
- This function returns a pointer to the screen contaning this window.
-
- INPUTS
- window - pointer to a window
-
- RESULTS
- screen - pointer to a screen containing window
-
- SEE ALSO
- DFUserPort()
-
- dfunc.library/DFScreenRastport dfunc.library/DFScreenRastport
-
- NAME
- DFScreenRastport -- Returns the rastport address of a screen.
-
- SYNOPSIS
-
- rastport=DFScreenRastport(Screen)
- a0
-
- struct rastport *DFWindowRastport(struct screen *);
-
-
- FUNCTION
- This function will return the address to th rastport of the window.
- It's really a dummy routine.
-
- INPUTS
- Screenw - pointer to a screen
-
- RESULTS
- rastport - pointer to a rastport structure
-
- SEE ALSO
- DFWindowRastport()
-
-
- dfunc.library/DFSearch dfunc.library/DFSearch
-
- NAME
- DFSearch -- Search for a word in a buffer.
-
- SYNOPSIS
-
- address=DFSearch(buffer,string,bufferSz)
- a0 a1 d0
-
- APTR DFSearch(APTR, STRPTR, ULONG);
-
-
- FUNCTION
- This function will search for a word in a buffer. The word you specify
- must be null terminated. The size of the buffer should be bigger than the
- word length.
-
- INPUTS
- buffer - pointer to start address
- string - pointer to word to search for
- bufferSz - size of buffer to search in
-
- RESULTS
- address - pointer to the word in buffer or null if not found.
-
- SEE ALSO
-
-
- dfunc.library/DFSetBPen dfunc.library/DFSetBPen
-
- NAME
- DFSetBPen -- Dummy for graphics.library/SetBPen().
-
- SYNOPSIS
-
- DFSetBPen(rastport,pen)
- a0 d0
-
- void DFSetBPen(struct rastport *, UBYTE);
-
-
- FUNCTION
- This function is a dummy function for graphics.library/SetBPen().
- It sets the background color for text etc. in the rastport.
-
- INPUTS
- rastport - pointer to a (window) rastport
- pen - pen number (palette number)
-
- SEE ALSO
- DFSetPen(), graphics.library/SetBPen()
-
-
- dfunc.library/DFSetColors dfunc.library/DFSetColors
-
- NAME
- DFSetColors -- Set new colors to a gadget.
-
- SYNOPSIS
-
- oldColors=DFSetColors(GadList,gad,newColors)
- a0 d0 d1
-
- ULONG DFSetColors(struct gadglist *, UWORD, ULONG);
-
-
- FUNCTION
- This function will set new colors to a gadget in a gadget list. The
- gadget is the gadget number in the gadgetlist. NewColors is the
- colorpacket to replace with. See the DFRenderGadgets() for more info on
- how to pack the colors.
-
- INPUTS
- GadList - pointer to a list of gadget structures.
- gad - gadget number to alter.
- newColors - new color packet
-
- RESULTS
- oldColors - the old color packet
-
- NOTES
- The gadget number must be in list or the newcolors can be written to an
- illegal memory area.
-
- SEE ALSO
- DFGetColors(), DFCountGads(), DFRenderGadgets()
-
-
- dfunc.library/DFSetDrMd dfunc.library/DFSetDrMd
-
- NAME
- DFSetDrMd -- Dumy function for graphics.library/SetDrMd().
-
- SYNOPSIS
-
- DFSetDrMd(rastport,mode)
- a0 d0
-
- void DFSetDrMd(struct rastport *, UWORD);
-
-
- FUNCTION
- This function is a dummy function for graphics.library/SetDrMd().
- It wil set the draw mode for text and graphics in the rastport. Jam 0,
- jam 1, Inversvide etc. See original function for more information.
-
- INPUTS
- rastport - pointer to a (window) rastport
- mode - draw mode
-
- SEE ALSO
- graphics.library/SetDrMd()
-
-
- dfunc.library/DFSetFlags dfunc.library/DFSetFlags
-
- NAME
- DFSetFlags -- Modifies the flags of a gadget in a gadgetlist.
-
- SYNOPSIS
-
- oldFlags=DFSetFlags(GadList,gad,newFlags)
- a0 d0 d1
-
- ULONG DFSetFlags(struct GadList *, LONG, LONG);
-
-
- FUNCTION
- This function will modify the flags of a gadget in a gadgetlist. Set flags
- by OR'ing them together.
-
- INPUTS
- GadList - pointer to a gadgetlist
- gad - gadget number in list to modify
- NewFlags - new flag attributes (32 bits)
-
- RESULTS
- oldFlags - the previous flag attributes
-
- BUGS
- Doesn't return oldFlag attributes yet.
-
- SEE ALSO
- DFGetFlags(), DFCountGads()
-
-
- dfunc.library/DFSetFont dfunc.library/DFSetFont
-
- NAME
- DFSetFont -- Sets a font in the rastport.
-
- SYNOPSIS
-
- success=DFSetFont(rastport,textattr,options)
- a0 a1 d0
-
- BOOL DFSetFont(struct rastport *, struct fontattr *, UBYTE);
-
-
- FUNCTION
- This function will set a font based on the font attributes to the
- rastport. The option value defines if the routine shall try to force
- diskload on the font or not.
-
- INPUTS
- rastport - pointer to a (window) rastport
- textattr - pointer to a fontattr/textattr (see example)
- options - 0 = try memory first, then diskload
- 1 = force diskload first.
-
- RESULTS
- success - true if success, false if any failure
-
- EXAMPLE
-
- TextAttr: dc.l FontName
- dc.w 8
- dc.b 0,0
-
- FontName: dc.b "topaz.font",0
-
- SEE ALSO
- graphics.library/OpenFont(), diskfont.library/OpenDiskFont()
-
-
- dfunc.library/DFSetGFont dfunc.library/DFSetGFont
-
- NAME
- DFSetGFont -- init a font for a gadget or replace the old one.
-
- SYNOPSIS
-
- oldFontattr=DFSetGFont(GadList,fontattr,gadget)
- a0 a1 d0
-
- struct fontattr *DFSetGFont(struct gadlist *, struct fontattr *, UWORD);
-
-
- FUNCTION
- This function will set a font attribute for a gadget which the gadget
- will use to render its text(s).
-
- INPUTS
- GadList - pointer to a list of gadget structures
- fontattr - pointer to a fon attribute
- gadget - gadget number in list
-
- RESULTS
- oldFontattr - pointer to the old font attribute or null.
-
- NOTES
- Do not give a pointer to the font itself (see example).
-
- EXAMPLE
-
- FontAttr: dc.l FontName
- dc.w 8
- dc.b 0,0
-
- FontName: dc.b "topaz.font",0
-
- SEE ALSO
- DFGetGFont(), DFCountGads(), DFSetFont()
-
-
- dfunc.library/DFSetID dfunc.library/DFSetID
-
- NAME
- DFSetID -- Alter the ID of a gadget.
-
- SYNOPSIS
-
- oldID=DFSetID(GadList,gadget,newID)
- a0 d0 d1
-
- LONG DFSetID(struct gadlist *, UWORD, LONG);
-
-
- FUNCTION
- This function will set or alter the ID of a gadget.
-
- INPUTS
- GadList - pointer to a list of gadget structures.
- gadget - gadget number
- newID - new ID
-
- RESULTS
- oldID - the old ID or null.
-
- NOTES
- Gadget number is not the same as gadget ID.
-
- SEE ALSO
- DFGetID(), DFFindID(), DFCountGads()
-
-
- dfunc.library/DFSetImage dfunc.library/DFSetImage
-
- NAME
- DFSetImage -- Set a image to a gadget or replaces it.
-
- SYNOPSIS
-
- oldImage=DFSetImage(GadList,newImage,gadget,no)
- a0 a1 d0 d1
-
- struct image *DFSetImage(struct gadlist *,struct image *,UWORD, UBYTE);
-
-
- FUNCTION
- This function will set an image to a gadget or replace an old one. The no
- field defines which of the gadget you want to replace. If you want to set
- the lower (pressed) field of the gadget you can also set image to be -1.
- This will tell the render routine not to render any gadget when gadget is
- pressed.
-
- INPUTS
- GadList - pointer to a list of gadget structures
- newImage - pointer to an image structure (if no=1 then optional -1)
- gadget - gadget number in list
- no - upper or lower image field (0 or 1)
-
- RESULTS
- oldImage - pointer to the old image or null (or -1 if no=1)
-
- NOTES
- The lowerfield image can be turned of by setting it to -1 instead of a
- pointer to a newImage. Consider therefor that you can also have returned
- -1 instead of a pointer or null.
-
- SEE ALSO
- DFGetImage(), DFCountGads()
-
-
- dfunc.library/DFSetPattern dfunc.library/DFSetPattern
-
- NAME
- DFSetPattern --
-
- SYNOPSIS
-
- oldPattern=DFSetPattern(rastport,pattern,size)
- a0 a1 d0
-
- UWORD DFSetPattern(struct rastport *, APTR, UWORD);
-
-
- FUNCTION
- This function will set a draw pattern in rastport. You will notice the
- effect on boxfills etc. Set the bitpattern in a table. Normally you only
- need to words and a size of 2 to make "ghosting" pattern.
-
- INPUTS
- rastport - pointer to a rastport
- pattern - pointer to pattern table
- size - size of pattern table
-
- RESULTS
- oldPattern - pointer to the old pattern
-
- BUGS
- Not quite sure if this is right thow.
-
- SEE ALSO
- DClrPattern()
-
-
- dfunc.library/DFSetPen dfunc.library/DFSetPen
-
- NAME
- DFSetPen -- Dummy for graphics.library/SetAPen().
-
- SYNOPSIS
-
- DFSetPen(rastport,pen)
- a0 d0
-
- void DFSetPen(struct rastport *, UBYTE);
-
-
- FUNCTION
- This function is a dummy function for graphics.library/SetAPen(). It will
- set the drawing pen color in rastport. See original function for more
- information.
-
- INPUTS
- rastport - pointer to a (window) rastport
- pen - pen number (palette number)
-
-
- SEE ALSO
- DFSetBPen(), graphics.library/SetAPen()
-
-
- dfunc.library/DFSetTitle dfunc.library/DFSetTitle
-
- NAME
- DFSetTitle -- Set new or replace title in a gadget.
-
- SYNOPSIS
-
- oldTitle=DFSetTitle(GadList,title,gadget,no)
- a0 a1 d0:16 d1:8
-
- STRPTR DFSetTitle(struct gadlist *, STRPTR, UWORD, UBYTE);
-
-
- FUNCTION
- This function will replace or set a new title to a gadget. The no defines
- which gadget text to be set. 0 = main text, 1 = text when gadget is
- pressed. You can set text even if the gadget has no text originally.
-
- INPUTS
- GadList - pointer to a list of gadget structures
- title - pointer to a null terminated string
- gadget - gadget number in list
- no - upper or lower gadgettext
-
- RESULTS
- oldTitle - pointer to the old gadget text
-
- SEE ALSO
- DFGetTitle(), DFCountGads()
-
-
- dfunc.library/DFStripBool dfunc.library/DFStripBool
-
- NAME
- DFStripBool -- Will strip longword bool made by DFMakeBool().
-
- SYNOPSIS
-
- values=DFStripBool(bool)
- d0:d1 d0
-
- values DFStripBool(ULONG);
- d0:d1
-
-
- FUNCTION
- This function will strip a packet longword to two values. The result will
- be returned in both d0 and d1 both in word size. The upper 16 bits will be
- returned in d1 and the lower 16 bits in d0.
-
- INPUTS
- bool - a longword packet by DFMakeBool()
-
- RESULTS
- values - d0 = lower 16 bits
- d1 = upper 16 bits
-
- SEE ALSO
- DFMakeBool()
-
-
- dfunc.library/DFStripText dfunc.library/DFStripText
-
- NAME
- DFStripText -- Strips a text buffer for comments and whitespace.
-
- SYNOPSIS
-
- length=DFStripText(scrBuff,dstBuff,mode)
- a0 a1 d0:8
-
- ULONG DFStripText(APTR, APTR, UBYTE);
-
-
- FUNCTION
- This function will strip a terminated buffer for comments and whitespace.
- It can handle five types of comments:
-
- /* comment 1 */
- // comment 2 //
- ; comment 3
- * comment 4 (only as the first sign on a line if mode=1)
- ## comment 5
-
- It goes thrue several passes: in first pass it will remove all comments.
- In second pass it will remove all double+ linefeeds. In the third pass it
- will remove all white space at beginning of each line. In the fourth pass
- it will remove all empty lines (spaces/tabs). In the fifth pass it check
- which mode is set, if mode=2 then check for special assembler comments.
- In the sixth pass it will remove all whitespaces at the end of each line.
-
- Still this routine is very fast indeed!
-
- INPUTS
- scrBuff - pointer to a null terminated buffer with ascii text.
- dstBuff - pointer to destination buffer to put stipped text.
- mode - 0 = All comments (not special assembler comments)
- 1 = Assembler mode
- It will not remove comments which starts with an asterix and
- are not the first sign on the line. F.eks:
- * comment - will be removed
- move.w #2*4 - will not be removed
- hello * comment - will not be removed
- 2 = Advanced assembler mode
- This mode will remove all comments pluss comments for assembler
- sources which does not begin with a comment sign. For example:
- move.l d0,d1 ;comment - will be removed
- move.l d0,d1 comment - will be removed
- 3 = C mode. Will only remove /*..*/ and //..// pairs.
-
- RESULTS
- length - length of stripped buffer
-
- NOTE
- The routine will only accept the * as a comment if the asterix is the
- first sign on the line. The astrix sign is often used in assembler code
- and if it will stripp it wrong if any thing else is allowed.
-
- SEE ALSO
-
-
- dfunc.library/DFToggle dfunc.library/DFToggle
-
- NAME
- DFToggle -- Toggles a gadget pressed or unpressed.
-
- SYNOPSIS
-
- prevState=DFToggle(Rastport,GadList,gadget)
- a0 a1 d0
-
- BOOL DFToggle(struct rasport *, struct gadlist *, UWORD);
-
-
- FUNCTION
- This function will toggle a togglable gadget. It will return false if
- gadget was previously unpressed or true if gadge was pressed.
-
- INPUTS
- Rastport - pointer to the window rastport the gadgets are using
- GadList - pointer to the gadgetlist
- gadget - gadget (number) to toggle
-
- RESULTS
- prevState - previous toggle state (bool)
-
- SEE ALSO
- DFGetToggle(), DFRenderGadgets()
-
-
- dfunc.library/DFUpdateGad dfunc.library/DFUpdateGad
-
- NAME
- DFUpdateGad -- Redraws a gadget.
-
- SYNOPSIS
-
- DFUpdateGad(rastport,GadList,gadget)
- a0 a1 d0
-
- void DFUpdateGad(struct rastport *, struct gadlist *, UWORD);
-
-
- FUNCTION
- This function will redraw a gadget in a gadget list. Use the same
- rastport for this function as for the rest of the gadgetlist.
-
- INPUTS
- rastport - pointer to a (window) rastport
- GadList - pointer to a gadgetlist
- gadget - gadget number to update
-
-
- SEE ALSO
- DFRenderGadgets(), DFToggle(), FindID()
-
-
- dfunc.library/DFUpperCase dfunc.library/DFUpperCase
-
- NAME
- DFUpperCase -- Will make letters in buffer uppercase.
-
- SYNOPSIS
-
- DFUpperCase(buffer,size)
- a0 d0
-
- void DFUpperCase(APTR, ULONG);
-
-
- FUNCTION
- This function will make all letters in the buffer uppercase. It will only
- handle valid ascii characters from a-z (+foreign special chars like
- æ, ø, å). The size can be 1.
-
- INPUTS
- buffer - pointer to start address
- size - size of buffer to convert
-
- SEE ALSO
- DFLowerCase()
-
-
- dfunc.library/DFUserPort dfunc.library/DFUserPort
-
- NAME
- DFUserPort -- Returns the pointer to the userport of window.
-
- SYNOPSIS
-
- userport=DFUserPort(window)
- a0
-
- struct msgport *DFUserPort(struct window *);
-
-
- FUNCTION
- This function will return a pointer to the userport of the window. If the
- IDCMP flags are not set, the result will be NULL. Use this returned
- address with the WaitPort(), GetMsg(), ReplyMsg() functions of the
- exec.library or the DFWaitGad() function in this library.
-
- INPUTS
- window - pointer to a window
-
- RESULTS
- userport - pointer to the userport (IDCMP port)
-
- SEE ALSO
- DFWaitgad()
-
-
- dfunc.library/DFViewport dfunc.library/DFViewport
-
- NAME
- DFViewport -- Returns pointer to a viewport structure.
-
- SYNOPSIS
-
- viewport=DFViewport(screen)
- a0
-
- struct viewport *DFViewport(struct screen *);
-
-
- FUNCTION
- This function will return the viewport address of the screen.
-
- INPUTS
- screen - pointer to a screen
-
- RESULTS
- viewport - pointer to viewport of screen
-
- SEE ALSO
- DFBitmap()
-
-
- dfunc.library/DFWaitGad dfunc.library/DFWaitGad
-
- NAME
- DFWaitGad -- Do a waitport and parse input activity.
-
- SYNOPSIS
-
- GadNum=DFWaitGad(Rastport, port, gadgetList)
- d0 a0 a1 a1
-
- message=DFWaitGad(Rastport, port, gadgetList)
- a0 a0 a1 a1
-
-
- LONG DFWaitGad(struct rastport *, struct msgport *, APTR);
- d0
-
- struct message *DFWaitGad(struct rastport *, struct msgport *, APTR);
- a0
-
-
- FUNCTION
- This function do a WaitPort(), GetMsg() and ReplyMsg() and parsing the
- gadgetlist to return gadget number pressed if any. This function returns
- also standard pointer to a message structure in A0 so you can read the
- message as usual.
-
- INPUTS
- Rastport - pointer to a valid rastport structure
- Port - pointer to a valid message port (like eg. the UserPort)
- gadgetList - pointer to a terminated gadgetlist of DFGadget strutures.
-
- RESULTS
- d0 - will return gadget pressed or NULL
- a0 - will return pointer to a message in any situation
-
- NOTES
- DO NOT Reply() message in A0!! This will mostly crash the system. The
- message you get is a copy of the original message which is already
- replied when you get it.
-
- SEE ALSO
- DFRenderGadgets(), DFUserPort()
-
-
- dfunc.library/DFWaitMsg dfunc.library/DFWaitMsg
-
- NAME
- DFWaitMsg -- Watches a message port.
-
- SYNOPSIS
-
- message=DFWaitMsg(port)
- a0
-
- struct message *DFWaitMsg(struct msgport *);
-
-
- FUNCTION
- This function will do a WaitPort(), GetMsg(), ReplyMsg(). It will not
- parse any DFGadgets. This function helps you in handling messages.
-
- INPUTS
- port - pointer to a valid message port structure (eg. UserPort)
-
- RESULTS
- message - pointer to a message structure
-
- NOTES
- DO NOT ReplyMsg() the message returned in d0. The message you get is
- a copy and is already replied when you get it!
-
- SEE ALSO
- exec.library/WaitPort(), exec.library/GetMsg(), exec.library/ReplyMsg()
-
-
- dfunc.library/DFWindowRastport dfunc.library/DFWindowRastport
-
- NAME
- DFWindowRastport -- Returns the rastport address of a window.
-
- SYNOPSIS
-
- rastport=DFWindowRastport(Window)
- a0
-
- struct rastport *DFWindowRastport(struct window *);
-
-
- FUNCTION
- This function will return the address to th rastport of the window.
- It's really a dummy routine.
-
- INPUTS
- Window - pointer to a window
-
- RESULTS
- rastport - pointer to a rastport structure
-
- SEE ALSO
- DFScreenRastport()
-
-
- dfunc.library/DFWriteStd dfunc.library/DFWriteStd
-
- NAME
- DFWriteStd -- Writes a string to current output stream.
-
- SYNOPSIS
-
- DFWriteStd(string)
- a0
-
- void DFWriteStd(STRPTR);
-
-
- FUNCTION
- This function will try to write a null terminated to the default output.
- If no such output handler is found or the length of the string is null the
- routine will skip writing which makes this routine safe.
- If you start your program from eg. CLI, the default output will be the cli
- window or the redirection.
-
- INPUTS
- string - pointer to a null terminated string. Can contain ansi sequences
- and linfeeds etc.
-
- SEE ALSO
- dos.library/Output(), dos.library/Write()
-
- *---------------------------------------------------------------------------*
- ##base _DFuncBase
- ##bias 30
- ##public
- *
- * FD version 37.13 (31.10.95)
- *
- * Gadget and port functions:
- *
- ##private
- DFCreateGadList(ListTags) (a0)
- DFFreeGadList(GadListBase) (a0)
- DFGadgetDesigner(Window,filename) (a0,d0)
- ##public
- DFRenderGadgets(RastPort,GadList) (a0/a1)
- DFWaitGad(RastPort,Port,GadBase) (a0/a1/a2)
- DFWaitMsg(Port) (a0)
- DFClrPort(Port) (a0)
- *
- * Scale functions for gadgets:
- *
- DFInitScale(Window,GadList) (a0/a1)
- DFScaleGads(scalebody) (d0)
- DFRemScale(scalebody) (d0)
- *
- * Gadget info:
- *
- DFGetFlags(GadList,gad) (a0,d0)
- DFSetFlags(GadList,gad,newFlags) (a0,d0/d1)
- DFGetColors(GadList,gad) (a0,d0)
- DFSetColors(GadList,gad,colors) (a0,d0/d1)
- DFGetTitle(GadList,gad,no) (a0,d0/d1)
- DFSetTitle(GadL,title,gad,no) (a0/a1,d0/d1)
- DFGetImage(GadList,gad,no) (a0,d0/d1)
- DFSetImage(GadL,Image,gad,no) (a0/a1,d0/d1)
- DFGetGFont(GadList,gad) (a0,d0)
- DFSetGFont(GadList,font,gad) (a0/a1,d0)
- DFGetID(GadList,gad) (a1,d0)
- DFSetID(GadList,gad,newID) (a0,d0/d1)
- DFFindID(GadList,ID) (a0,d0)
- DFToggle(Rastport,GadList,gad) (a0/a1,d0)
- DFGetToggle(GadList,gad) (a0,d0)
- DFCountGads(GadList) (a0)
- DFUpdateGad(Rastport,GadL,gad) (a0/a1,d0)
- *
- * Graphics:
- *
- DFSetPen(Rastport,pen) (a0,d0)
- DFSetBPen(Rastport,pen) (a0,d0)
- DFSetDrMd(Rastport,mode) (a0,d0)
- DFSetFont(Rastport,TextAtt,opt) (a0/a1,d0)
- DFClrRast(RastPort,yPos,mode) (a0,d0/d1)
- DFFillWindow(Window,mode) (a0,d0)
- DFLine(Rast,x1,y1,x2,y2) (a0,d0/d1/d2/d3)
- DFBox(Rastport,x1,y1,x2,y2) (a0,d0/d1/d2/d3)
- DFDrawI(Rast,Image,x,y) (a0/a1,d0/d1)
- DFBeavel(Rast,x,y,w,h,cols) (a0,d0/d1/d2/d3/d4)
- ##private
- DFLoadIFF(Bitmap,filename) (a0/a1)
- ##public
- DFSaveIFF(Screen,filename,mode) (a0/a1,d0)
- DFLoadRGB4(screen,colors,no) (a0/a1,d0)
- DFSetPattern(Rast,pattern,size) (a0/a1,d0)
- DFClrPattern(Rastport) (a0)
- *
- * Text:
- *
- ##private
- DFPrintText()()
- ##public
- DFPrintTxt2(Rastport,text,x,y) (a0/a1,d0/d1)
- DFWriteStd(Text) (a0)
- DFPrintF(ras,str,ins,buf,x,y) (a0/a1/a2/a3,d0/d1)
- DFSearch(Buffer,String,BuffSz) (a0/a1,d0)
- DFUpperCase(Buffer,length) (a0,d0)
- DFLowerCase(Buffer,length) (a0,d0)
- DFMakeASCII(Buffer,length,mode) (a0,d0/d1)
- DFFindStrLen(String) (a0)
- DFCopyString(srcStr,dstStr) (a0/a1)
- *
- * Dos:
- *
- DFGetFileLength(file) (a0)
- DFLoadFile(file) (a0) ;[d1=length]
- DFRemFile(filebuffer) (a0)
- DFDeleteFile(file) (a0)
- DFSaveBuffer(file,buffer,size) (a0/a1,d0)
- *
- * Intuition:
- *
- ##private
- DFOpenXWindow(XWindowStruct) (a0)
- DFCloseXWindow(XWindow) (a0)
- ReservedFunctionSlot1() ()
- DFRefreshXFrame(XWindow) (a0)
- ##public
- DFWindowRastport(window) (a0)
- DFScreenRastport(screen) (a0)
- DFScreenOfWindow(window) (a0)
- DFViewport(screen) (a0)
- DFBitmap(screen) (a0)
- ##private
- DFFindScreen(title) (a0)
- DFFindWindow(title) (a0)
- DFPointerOff(window) (a0)
- DFPointerOn(window,pointer) (a0/a1)
- DFMakeRastport(buffer,w,h,d) (a0,d0/d1/d2)
- DFRemRastport(rastport) (a0)
- ##public
- DFAllocBitmap(w,h,d) (d0/d1/d2)
- DFFreeBitmap(bitmap) (a0)
- *
- * Misc:
- *
- DFGraphicsBase() ()
- DFDosBase() ()
- DFIntuitionBase() ()
- DFUserport(window) (a0)
- DFMakeBool(value1,value2) (d0/d1)
- DFStripBool(bool) (d0)
- DFDisable() ()
- DFEnable() ()
- *
- * Tasks:
- *
- DFNewProcess(code,name) (a0/a1)
- DFFindTask(taskname) (a0)
- DFRenameTask(task,newName) (a0/a1)
- *
- * Memory:
- *
- DFAllocVMem(size,type) (d0/d1)
- DFFreeVMem(memory) (a0)
- DFGetVMemSize(memory) (a0)
- DFClrCache() ()
- *
- * Printer:
- *
- DFPrinterComand(command) (d0)
- DFPrinterText(text) (a0)
- DFPrinterWindow(window,printStruct) (a0/a1)
- *
- * Sound:
- *
- ##private
- DFDrawSample(sampleStruct) (a0)
- DFInitModule(module) (a0)
- DFStartModule() ()
- DFStopModule() ()
- DFRemModule(modBase) (a0)
- *
- * Misc:
- *
- DFCalcColormap() ()
- ##public
- DFDeltaList(GadList,x,y) (a0,d0/d1)
- ##private
- DFAllocList(List) (a0)
- DFFreeList(ListHdr) (a0)
- ##public
- DFCalcArg(string) (a0)
- DFReadArg(string,destBuffer) (a0/a1)
- DFStripText(scrBuff,dstBuff) (a0/a1)
- DFNewPrintText(window,text,x ,y ,mode)(a0/a1,d0/d1/d2)
- DFGhostGads(gadgets,mode)(a0,d0)
- DFGetProc()()
- DFGetMath()()
- DFReverseBuffer(buffer,length)(a0,d0)
- DFCompareStr(string1,string2,mode)(a0/a1,d0)
- ##end
-